package com.easy.easy.Service.impl;

import com.easy.easy.Service.IAdminService;
import com.easy.easy.bean.Admin;
import com.easy.easy.dao.AdminDao;
import com.easy.easy.util.Page;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Collections;
import java.util.List;
@Service
public class AdminServiceimpl implements IAdminService {

    @Autowired
    AdminDao adminDao;

    @Override
    public int add(Admin admin) {
        return adminDao.add(admin);
    }

    @Override
    public int edit(Admin admin) {
        return adminDao.edit(admin);
    }

    @Override
    public int delete(int adminid) {
        return adminDao.delete(adminid);
    }


    @Override
    public List<Admin> getList(Page page, String text) {
        return adminDao.getList(page, text);
    }

    @Override
    public Admin getAdminByAdminName(String adminname) {
        return adminDao.getAdminByAdminName(adminname);
    }

    @Override
    public int getCount(String text) {
        return adminDao.getCount(text);
    }
}
